import { combineReducers } from 'redux';
import { persistReducer } from 'redux-persist';
import counterReducer from './counterReducer'

import commonReducer from './commonReducer'

import session from 'redux-persist/lib/storage/session';

const rootPersistConfig = {
	key: 'root',
	storage: session,
	// reducer 里不持久化的数据,除此外均为持久化数据 这个auth对应combineReducers中的键
	blacklist: [  ],
	// reducer 里持久化的数据,除此外均为不持久化数据
	whitelist: ['counter']
};
const rootReducer = combineReducers({
	counter: counterReducer,
	common: commonReducer
});


export default persistReducer(rootPersistConfig, rootReducer);